import pymysql



class Mysql_write:
    def __init__(self, host = 'localhost', user = 'root', password = '123456', database = 'hr_sql', port = 3306, charset = 'utf8'):
        self.host = host
        self.user = user
        self.password = password
        self.database = database
        self.port = port
        self.charset = charset


    def connect(self):
        self.conn = pymysql.connect(host='localhost',
                               user='root',
                               password='123456',
                               database='hr_sql',
                               charset='utf8'
                               )
        return self.conn